﻿@model HQPad.Models.Spell

@{
    ViewBag.Title = "Create new spell";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
    var ruleSetId = (int) ViewBag.RuleSetID;
}

<h1>Create new spell</h1>

@section PageScripts {
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
}

<section class="content">

@using (Html.BeginForm()) {
    <fieldset class="block form form-wide-label">
        <legend>Basics</legend>

            @Html.ValidationSummary(true)

            @Html.Hidden("RuleSetID", ruleSetId)

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.Name)
        </div>
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.Family)
        </div>
            @Html.EditorFor(model => model.Family)
            @Html.ValidationMessageFor(model => model.Family)
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.GroupName)
        </div>
            @Html.EditorFor(model => model.GroupName)
            @Html.ValidationMessageFor(model => model.GroupName)
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.RequiredGroupName)
        </div>
            @Html.EditorFor(model => model.RequiredGroupName)
            @Html.ValidationMessageFor(model => model.RequiredGroupName)
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.Description)
        </div>
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.Level)
        </div>
            @Html.DropDownList("Level")
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.Range)
        </div>
            @Html.EditorFor(model => model.Range)
            @Html.ValidationMessageFor(model => model.Range)
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.Duration)
        </div>
            @Html.EditorFor(model => model.Duration)
            @Html.ValidationMessageFor(model => model.Duration)
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.IsExtendable)
        </div>
            @Html.EditorFor(model => model.IsExtendable)
            @Html.ValidationMessageFor(model => model.IsExtendable)
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.IsSpecialist)
        </div>
            @Html.EditorFor(model => model.IsSpecialist)
            @Html.ValidationMessageFor(model => model.IsSpecialist)
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.IsPrimary)
        </div>
            @Html.EditorFor(model => model.IsPrimary)
            @Html.ValidationMessageFor(model => model.IsPrimary)
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.IsCommon)
        </div>
            @Html.EditorFor(model => model.IsCommon)
            @Html.ValidationMessageFor(model => model.IsCommon)
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.Colour)
        </div>
            @Html.DropDownList("Colour")
            @Html.ValidationMessageFor(model => model.Colour)
        </div>

        <div class="field-item">
        <div class="label">
            @Html.LabelFor(model => model.StoreType)
        </div>
            @Html.DropDownList("StoreType")
            @Html.ValidationMessageFor(model => model.StoreType)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div class="block">
    @Html.ActionLink("Back to List", "Index", null, new { @class="button" })
</div>

</section>